cmake_minimum_required( VERSION 3.10 )
project( rtsp )

set( CMAKE_C_COMPILER gcc )
set( CMAKE_CXX_COMPILER g++ )


set( SRCS   ./src/rtsp_service.cpp
            ./src/rtsp_h264liveSource.cpp
            ./src/rtsp_h264liveSMS.cpp
            ./src/rtsp_interface.cpp)

set( CMAKE_VERBOSE_MAKEFILE off )

include_directories( ./components/include/BasicUsageEnvironment/include/
                    ./components/include/groupsock/include/
                    ./components/include/liveMedia/include/
                    ./components/include/mediaServer/include/
                    ./components/include/UsageEnvironment/include/
                    ./components/include/
                    ./inc )

add_library( ${PROJECT_NAME} SHARED ${SRCS} )



target_link_libraries( ${PROJECT_NAME} -pthread
                                       dl
                                        )

target_link_libraries( ${PROJECT_NAME}  libliveMedia.a
                                        libgroupsock.a
                                        libBasicUsageEnvironment.a
                                        libUsageEnvironment.a
                                        libssl.a
                                        libcrypto.a
                                        libdl.so
                                        libstdc++.so
                                        )


#设置安装路径
set(CMAKE_INSTALL_PREFIX "/home/zheng2/rk_nfs")
install(TARGETS ${PROJECT_NAME}
        RUNTIME ${CMAKE_INSTALL_BINDIR})

